During rasterization of graphics primitives, rasterized coverage information is produced that indicates which pixels are covered by each of the graphics primitives. When multi-sampling or anti-aliasing is used, each pixel includes multiple sample locations and the coverage information indicates which of the sample locations are covered. The covered pixels are then processed to generate a final color value for each of the pixels of an image.
Modern graphics processors typically perform early z-testing to avoid processing pixels for a graphics primitive that is behind, and therefore, occluded by another graphics primitive. Early z-testing is performed before shading operations, to avoid the expense of performing shading operations that will not contribute to the final color values of pixels in the image. The shading operations produce shaded fragments representing color data for the graphics primitives that cover at least one sample of a pixel and survived the early z testing. After the shading operations, comprehensive z-testing may be performed to remove shaded fragments that are occluded and therefore not visible in the image, so that color data for the non-visible shaded fragments are not written to a pixel of the image.
As the result of shading operations, some shaded fragments may not contribute to the final color of a pixel. It is desirable to avoid further processing of the non-contributing shaded fragments. Thus, there is a need for addressing this issue and/or other issues associated with the prior art.